<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/1/14
  Time: 15:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>多条件库存查询</title>
    <script src="../element/vue.js"></script>
    <link rel="stylesheet" href="../element/index.css">
    <script src="../element/index.js"></script>
    <link rel="stylesheet" type="text/css" href="../styles/basc.css">
</head>
<body>
<div id="app">
    <%@ include file="../includes/hear.jsp" %>
    <div class="left">
        <%@ include file="../includes/menu.jsp" %>
    </div>
    <div class="right">
        <div style="margin-left: 70px;margin-top: 20px;border-bottom: 1px solid #B1648A;width: 400px;">
            <el-input v-model="zname" placeholder="商品名字" style="width: 100px;"></el-input>
            <el-input v-model="stacount" placeholder="最小数量" style="width: 100px;"></el-input>
            <el-input v-model="endcount" placeholder="最高数量" style="width: 100px;"></el-input>
            <el-button type="primary" plain style="width: 80px;" @click="cx()">查询</el-button>
        </div>
        <div style="width: 580px;margin-left: 170px;margin-top: 40px;">
            <table class="dt" border="0" cellspacing="1">
                <tr>
                    <th>序号</th>
                    <th>商品名称</th>
                    <th>商品数量</th>
                    <th>类别编号</th>
                    <th>供应商</th>
                </tr>
                <c:forEach items="${sessionScope.stall.data}" var="record" varStatus="rows">
                    <tr>
                        <td>${(stall.pageNo-1)*stall.pageSize+rows.count}</td>
                        <td>${record.zname}</td>
                        <td>${record.zcount}</td>
                        <td>${record.gid}</td>
                        <td>${record.sup_name}</td>
                    </tr>
                </c:forEach>
            </table>
            <div class="pagenav">${sessionScope.stall.pageNav}</div>
        </div>
    </div>
</div>
</body>
<script>
    new Vue({
        el:'#app',
        data:{
            zname:"",
            stacount:"",
            endcount:""
        },
        methods:{
            cx(){
                var log = {
                    zname:this.zname,
                    stacount:this.stacount,
                    endcount:this.endcount
                }
                window.location.href="${webroot}/stock/stockall.do?c1="+JSON.stringify(log)
            }
        }
    })
</script>
</html>
